
## ========================================================= ##
## Only Modify Here, if you want to add a driver directory   ##
## !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ##
## ========================================================= ##

if(${ARCH} MATCHES "arm*")
    message(STATUS "selected arm")
    include(${CMAKE_CURRENT_LIST_DIR}/arm/arm.cmake)
elseif(${ARCH} MATCHES "riscv*")
    message(STATUS "selected riscv")
    include(${CMAKE_CURRENT_LIST_DIR}/riscv/riscv.cmake)
else()
    message(FATAL_ERROR "Must specify ARCH macro")
endif()

include_directories(${GLB_INC_DIR}/kernel)
include_directories(${GLB_INC_DIR}/innerapi)

## usually, do not need to modify things below this line
## ========================================================= ##

set(THIS_LIBNAME arch)
project(${THIS_LIBNAME})


## ===================================== ##
## Generally, it is NOT been supposed    ##
## to modify the code below this line.   ##
## ===================================== ##

message(STATUS "\n-- [^.^]********${THIS_LIBNAME}********[^.^]")
message(STATUS "The sources in [ " ${CMAKE_CURRENT_LIST_DIR} " ] are:")
foreach(SRC ${SRCS})
    message(STATUS "[src] " ${SRC})
endforeach()

add_library(${THIS_LIBNAME} STATIC ${SRCS})